package cn.bigfire.wzdj.frame;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

public class GridPanel {

    JPanel gridPanel = new JPanel(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    int col = 3;
    int line = 3;


    public GridPanel() {
        gbc.insets = new Insets(0, 0, 0, 0);
        gbc.gridwidth = 1;
        gbc.gridy = 0;
        gbc.gridx = 0;
    }

    public GridPanel(String title) {
        gridPanel.setBorder(BorderFactory.createTitledBorder(title));
        gbc.gridwidth = 1;
        gbc.gridy = 0;
        gbc.gridx = 0;
    }

    public GridPanel(String title, int col, int line) {
        gridPanel.setBorder(BorderFactory.createTitledBorder(title));
        this.col = col;
        this.line = line;
        gbc.gridwidth = 1;
        gbc.gridy = 0;
        gbc.gridx = 0;
    }

    public void add(Component comp) {

    }

    public void set(Component comp, int col, int line) {

    }


}
